From d0ee5ed9f4e8626c309b94006226eb746ab0b4af Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Tue, 2 Jun 2026 16:30:18 -0400 Subject: [PATCH] workspaceAnimation: Block workspace updates during switch WorkspaceAnimation uses a fixed set of workspace indices to transition between for each gesture/animation. That means that if workspaces change during the animation, the mapping from workspace adjustment value to the animation progress can involve invalid indices and the animation ends on the wrong workspace. To fix this, block workspace updates during the animation. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8148 Part-of: (cherry picked from commit eaa4e0577a08c3ed38b5f512b4af0b88ede7f1f5) --- js/ui/workspaceAnimation.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js index db4050a2a..f7c2f7a3b 100644 --- a/js/ui/workspaceAnimation.js +++ b/js/ui/workspaceAnimation.js @@ -407,6 +407,7 @@ export class WorkspaceAnimationController { switchData.monitors.push(group); } + Main.wm.blockWorkspaceUpdates(); global.compositor.disable_unredirect(); this._grab = Main.pushModal(global.stage, { actionMode: Shell.ActionMode.NORMAL, @@ -414,6 +415,7 @@ export class WorkspaceAnimationController { } _finishWorkspaceSwitch(switchData) { + Main.wm.unblockWorkspaceUpdates(); global.compositor.enable_unredirect(); if (this._grab) { -- 2.39.5